#ifndef __PARSER_UTIL_H__
#define __PARSER_UTIL_H__

#include <stdio.h>
extern int yylinenum;
extern int yycolumnno;
extern const char* yyfilename;
extern FILE *yyin;

extern void yyerror(char *);
extern int yyparse(void);
extern int yylex(void);

#include "SymTabMgr.h"

extern SymTabMgr stm;

#include "STEClasses.h"
extern EventEntry *any, *other;

#include "SymTab.h"
ErrorST insertSymbolErrCheck(SymTabEntry* se);
void enterScopeErrCheck(SymTabEntry*);

#define errMsgLn(s) errMsg(s)


string newName(const string& type);
string newLabel();
string newLabel(string);
string newState();
string itoa(int i);
string gen_temp();
Type *setCoercedType(Type *, Type *, ExprNode *, ExprNode *);
bool isIntFloat(Type *);
three_addr_ins *genLabel(string);
three_addr_ins *genGotoLabel(string);
bool isRelOp(int opcode);
three_addr_ins *genIfLabel(address *, string, address *, char *);
three_addr_ins *genRuleLabel(string, char*);
three_addr_ins *genStateLabel(string , string, char *);
three_addr_ins *genUpdateStateLabel(string, string);

#include "all.h"
#include "Ast.h"
#include "Value.h"
#include "Error.h"
#endif
